#{extends 'master.html' /}
#{set title:'DigitalBand.ru - Контакты' /}
#{set isCatalogActive:'active' /}
<div class="page-header">
    <div class="categoryHead">
        <h3 class="categoryTitle">${product.title}</h3>
        <div class="clear"></div>
    </div>
    <div class="breadcrumbs">
        <a href="/" class="home_button">&nbsp;</a>
    </div>
</div>
<div class="page-block">
    <h4>Задать вопрос</h4>
#{form @ask()}

    #{if flash.error}
        <p class="error">
        &{flash.error}
        </p>
    #{/if}
    #{if flash.success}
        <p class="success">
        &{flash.success}
        </p>
    #{/if}
    <div class="form">
        <fieldset>
            <div>
                <label for="username">&{'Shop.contacts.username'}</label>
                <input type="text" name="username" id="username" value="${flash.username}"/>
            </div>
            <div>
                <label for="email">&{'Shop.contacts.email'}</label>
                <input type="text" name="email" id="email" value="${flash.email}"/>
            </div>
            <div>
                <label for="message">&{'Shop.contacts.body'}</label>
                <textarea name="message" id="message" cols="5" rows="5">${flash.message}</textarea>
            </div>
            <div>
                <label for="captcha">Код проверки</label>
                <div id="captcha" style="display: inline-block;">
                    <script type="text/javascript"
                            src="http://www.google.com/recaptcha/api/challenge?k=6LfuQdYSAAAAANoCLOZIRyPFnJ8quXNnCjTWb46c">
                    </script>
                    <noscript>
                        <iframe src="http://www.google.com/recaptcha/api/noscript?k=6LfuQdYSAAAAANoCLOZIRyPFnJ8quXNnCjTWb46c"
                                height="300" width="500" frameborder="0"></iframe><br>
                        <textarea name="recaptcha_challenge_field" rows="3" cols="40">
                        </textarea>
                        <input type="hidden" name="recaptcha_response_field"
                               value="manual_challenge">
                    </noscript>
                </div>
            </div>
            <input type="hidden" name="productId" value="${product.id}"/>
        </fieldset>
    </div>
    <div class="bottom-button">
        <input type="submit" id="signin" value="&{'Shop.contacts.ask'}"/>
    </div>
#{/form}
</div>